package com.thzy.bbs.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.thzy.bbs.R;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

/**
 * 异常界面
 *
 * @author Lirui
 */
@ContentView(R.layout.activity_eroor)
public class ErrorActivity extends AppCompatActivity {
    @ViewInject(R.id.wifi)
    private ImageView imageView;
    @ViewInject(R.id.error_button)
    private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_eroor);
        x.view().inject(this);
    }

    @Event(value = {R.id.error_button}, type = View.OnClickListener.class)
    private void onButtonClick(View v) {
        if (v.getId() == R.id.error_button) {
            Intent intent = new Intent(this, MainActivity.class);
            this.startActivity(intent);
            finish();
        }
    }
}
